#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void Swit(int str[], int len)
{
	int tem = 0;
	for (int i = 0; i < len-1; i++)
	{
		for (int j = 0; j < len - 1-i;j++)
		{
			if (str[j] % 2 == 0 && str[j + 1] % 2 != 0)
			{
				tem = str[j];
				str[j] = str[j+1];
				str[j+1] = tem;
			}
		}
	}

}
int main()
{
	int arr[] = { 2,4,6,8,1,3,5,7 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	Swit(arr, sz);
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}